package com.fessc.develop.model.enums;

import com.fessc.develop.utils.BusiUtil;
import lombok.Getter;

@Getter
public enum EnumForwardType {

    //3.3 边民开户核验查询-BS0003（银行->市场交易平台->互联互通）
    BS0003_TO_MP0001("BS0003", "MP0001"),

    //3.4 银行账号信息同步-BS0004（银行->市场交易平台->互联互通）
    BS0004_TO_MP0002("BS0004", "MP0002"),

    //3.3 电子虚户信息查询-MP0004（市场交易平台->互联互通->银行）
    MP0003_TO_FS0001("MP0003", "FS0001"),

    //3.4 短信验证码发送-MP0005（市场交易平台->互联互通->银行）
    MP0004_TO_FS0007("MP0004", "FS0007"),

    //3.5 获取人脸识别链接-MP0006（市场交易平台->互联互通->银行）
    MP0005_TO_FS0008("MP0005", "FS0008"),

    //3.6 人脸识别结果同步-MP0007（市场交易平台->互联互通->银行）
    MP0006_TO_FS0009("MP0006", "FS0008");

    private final String formServiceCode;

    private final String toServiceCode;

    public static String getToServiceCode(String formServiceCode) {
        String returnValue = "";
        for (EnumForwardType type : EnumForwardType.values()) {
            if (BusiUtil.isEquals(type.getFormServiceCode(), formServiceCode)) {
                returnValue = type.getToServiceCode();
            }
        }
        return returnValue;
    }

    EnumForwardType(String formServiceCode, String toServiceCode) {
        this.formServiceCode = formServiceCode;
        this.toServiceCode = toServiceCode;
    }

}
